<!DOCTYPE html>
<html lang="zh-cmn-Hans">

<head>
    <meta charset="UTF-8">
    <title>医生管理界面</title>
    <link rel="stylesheet" href="../css/bootstrap.css">
    <link rel="stylesheet" href="../css/doctor.css">
    <script type="text/javascript" src="../js/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.js"></script>
</head>

<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="#">MCMS</a>
        </div>
        <div>
            <ul class="nav navbar-nav">
                <li class="active"><a href="../index.html">首页</a></li>
                <li><a href="#">帮助</a></li>
            </ul>
        </div>
    </div>
</nav>
<div id="content">
    <div id="navigation-1">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#">个人信息</a></li>
            <li><a href="#">账号信息</a></li>
        </ul>
    </div>
    <div id="navigation">
        <ul class="nav nav-pills nav-stacked">
            <li class="active"><a href="doctorinformation.html">医生信息</a></li>
            <li><a href="cases.html">病例创建</a></li>
            <li><a href="patient-record.html">患者管理</a></li>
            <li><a href="about.html">关于</a></li>
        </ul>
    </div>
    <div class="division">
    </div>
    <div id="personInformation">
        <h3 class="text-info">基本信息</h3>
        <div class="division1"></div>
        <p id="name" class="text-muted">姓名&nbsp;&nbsp;&nbsp;</p>
        <p id="sex" class="text-muted">性别&nbsp;&nbsp;&nbsp;</p>
        <p id="birth" class="text-muted">年龄&nbsp;&nbsp;&nbsp;</p>
        <div>
            <h3 class="text-info">从医信息</h3>
            <div class="division1"></div>
            <div class="area-information">
                <p id="hos" class="text-muted">工作医院&nbsp;&nbsp;&nbsp;</p>
                <p id="type" class="text-muted">工作职位&nbsp;&nbsp;&nbsp;</p>

            </div>
            <div class="area-img">
            </div>
        </div>
    </div>
</div>

<script src="../js/jquery-3.3.1.js"></script>

<script>
    $(function () {
        initData();
    });

    //加载初始化数据
    function initData() {
        $.ajax({
            type: 'post',
            dataType: "json",
            url: "/ajax/get_doctor_info",
            success: function (res) {

                console.log(res);

                $("#name").append(res.data.doctor_name);
                $("#sex").append(res.data.doctor_sex);
                $("#birth").append(res.data.doctor_birth_year+res.data.doctor_birth_mouth+res.data.doctor_birth_day);
                $("#hos").append(res.data.doctor_hospital_name);
                $("#type").append(res.data.doctor_office_name);

            },
            error: function () {
//            $("#test").html("发生错误:"+jqXHR.status);
                alert("发生错误");
            }
        });
    }


</script>
</body>

</html>
